<%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt" %>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Auto Parts</title>
<link rel="stylesheet" type="text/css" href="../../css/mokstyle.css" />
		<script type="text/javascript">
		function change(id,status){
			window.location="/aasimp/mok/maintenance/approve_changeodd?status="+status+"&oddId="+id;
		}
		function init(){
    		if("${odds}"!=""){
				document.getElementById('odd').style.display = 'block';
    		}
    		if("${oneOdd}"!=""){
				document.getElementById('main').style.display = 'block';
    		}
		}
		function show(id){
			window.location="/aasimp/mok/maintenance/approve_showodd?oddId="+id;
		}
		</script>
</head>
<body onload="init()">

<div  id="wrap">
 	<div class="header">
       		<div class="logo"><a href="/aasimp/mok/maintenance/index_getMtInfo"><img src="../../images/logo.gif" alt="" title="" border="0" /></a></div>            
        <div id="menu">
            <ul>                                                                       
            <li><a href="/aasimp/mok/maintenance/index_getMtInfo">首页</a></li>
            <li><a href="/aasimp/mok/maintenance/info_getcompany">个人资料</a></li>
            <li><a href="/aasimp/mok/maintenance/odd_getOdd" >维修申请</a></li>
            <li class="selected"><a href="/aasimp/mok/maintenance/approve_showApprove">审批维修</a></li>
            <li><a href="/aasimp/mok/maintenance/mt_showmts">维修记录</a></li>
            <li><a href="sendInfo.jsp">信息发布</a></li>
            <li><a href="/aasimp/mok/maintenance/report_showMtReport">报表统计</a></li>
            </ul>
        </div>  
       </div> 
       
       <div class="center_content" style="background-color:#FFFFFF;">
       	<div class="left_content" style="width: 880px">
       		<div class="crumb_nav">
            <a href="/aasimp/mok/maintenance/index_getMtInfo">home</a> &gt;&gt; 审批维修
            </div>
        	
            <div class="title"><span class="title_icon"><img src="../../images/bullet1.gif" alt="" title="" /></span>
			<a href="javascript:void(0)" onclick="window.location='/aasimp/mok/maintenance/approve_showApprove'" style="text-decoration: none">审批申请单</a>
			</div>
        
        	<center>
        	<div class="feat_prod_box_details" id="odd" style="display: none;">
            <p class="details">
            </p>
                 <form name="register" action="#">          
                    <table width="100%"  border="1" align="center" cellspacing="1">
                    	<tr>
                    		<th>预约单号</th>
                    		<th>预约日期</th>
                    		<th>车辆识别号</th>
                    		<th>申请人姓名</th>
                    		<th>手机</th>
                    		<th>邮箱</th>
                    		<th>状态</th>
                    		<th>操作</th>
                    	</tr>
                    	<tr>
                    	<c:forEach var="odd" items="${odds}">
						  <tr>
						    <td align="center">${odd.oddId }</td>
						    <td align="center"><fmt:formatDate value="${odd.oddDate }" pattern="yyyy年MM月dd日"/></td> 
						    <td align="center">${odd.vin }</td>
						    <td align="center">${odd.personname }</td>
						    <td align="center">${odd.persontel }</td>
						    <td align="center">${odd.personemail }</td>
						    <td align="center">
						    <c:if test="${odd.status=='1'}">新</c:if>
						    <c:if test="${odd.status=='2'}">审批通过</c:if>
						    <c:if test="${odd.status=='3'}">审批未通过</c:if>
						    </td>
                    		<td><a href="javascript:void(0)" onclick="show('${odd.oddId }')">查看</a>
                    		<a href="javascript:void(0)" onclick="change('${odd.oddId }',2)">通过</a>
                    		<a href="javascript:void(0)" onclick="change('${odd.oddId }',3)">未通过</a></td>
						  </tr>
					 	 </c:forEach>
                    	</tr>
                    </table>
                  </form>
            </div>	
            
        	<div class="feat_prod_box_details" id="main" style="display: none;">
            <p class="details">
            </p>
                 <form name="register" action="#">          
                    <div class="form_row" style="width: 345px">
                    <label class="contact" style="width: 78px"><strong>预约单号：</strong></label>
                    <input value="${oneOdd.oddId }" type="text" class="contact_input" />
                    </div>  
                    
                    <div class="form_row" style="width: 345px">
                    <label class="contact" style="width: 78px"><strong>预约日期：</strong></label>
                    <input value="${oneOdd.oddDate }" type="text" class="contact_input" />
                    </div> 

                    <div class="form_row" style="width: 345px">
                    <label class="contact" style="width: 78px"><strong>车辆识别号：</strong></label>
                    <input value="${oneOdd.vin }" id="vin" value="" type="text" class="contact_input" />
                    </div>
                    
                    <div class="form_row" style="width: 345px">
                    <label class="contact" style="width: 78px"><strong>申请人姓名：</strong></label>
                    <input value="${oneOdd.personname }" type="text" class="contact_input" />
                    </div> 
                    
                    <div class="form_row" style="width: 345px">
                    <label class="contact" style="width: 78px"><strong>手机：</strong></label>
                    <input value="${oneOdd.persontel }" type="text" class="contact_input" />
                    </div> 
                    
                    <div class="form_row" style="width: 345px">
                    <label class="contact" style="width: 78px"><strong>邮箱：</strong></label>
                    <input value="${oneOdd.personemail }" type="text" class="contact_input" />
                    </div> 
                    
                    <div class="form_row" style="width: 345px">
                    <label class="contact" style="width: 78px"><strong>维修原因：</strong></label>
                    <textarea id="remark" name="remark" class="contact_input" cols="27" rows="3">${oneOdd.remark }</textarea>
                    </div> 

                    <div class="form_row" style="width: 345px">
                    <input type="button" class="register" value="返回" onclick="window.location='/aasimp/mok/maintenance/approve_showApprove'"/>
                    </div>   
                  </form>
            </div>	</center>
            
            
        <div class="clear"></div>
        </div><!--end of left content-->
            
       <div class="clear"></div>
       </div><!--end of center content-->
       <div class="footer">
       	<div class="left_footer"><img src="../../images/footer_logo.gif" alt="" title="" /><br /> </div>
        <div class="right_footer">
       
        </div>
        
       
       </div>
       
    </div>
</body>
</html>